package com.apesource.bookBuy.mapper;

import com.apesource.bookBuy.bean.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @version 1.0
 * @auther:暮雪
 * @date:2025/9/5
 */
public interface UserMapper {
    @Insert("insert into users(uname,username,userpasswd) values (#{useremail},#{username},#{userpassword})")
    int registerUser(User user);

    @Select("select * from users where uname=#{param1} and userpasswd=#{param2}")
    User findUser(String uemail, String userpassword);

    @Update("update users set userpasswd=#{param2} where uname=#{param1}")
    int updateUserPasswd(String uemail, String userpassword);


    //BHS3SBf3hcfrARwf


}
